package com.uco.oop;

public class Test {
    public static void main(String[] args) {
        constructorTest();
        System.out.println(Constructor.name);
    }

    public static void starTest() {
        Star jay_zhou = new Star();
        jay_zhou.name = "周杰伦";
        jay_zhou.age = 50;
        jay_zhou.weight = 80.5;
        jay_zhou.height = 1.8;

        jay_zhou.print();
    }

    public static void constructorTest() {
        Constructor c1 = new Constructor();
        Constructor c2 = new Constructor(1);
        Constructor c3 = new Constructor(1, 2);
        System.out.println(c3.height);
        c3.name = "jay"; // 对象也能访问类变量，但是不推荐
        System.out.println(c3.name);
    }

    public static void packageTest() {
        Package p = new Package();
        p.echoAge();
    }

    public static void javaBeanTest() {
        JavaBean jb = new JavaBean();
        jb.setAge(1);
        jb.setHeight(2);
        jb.setName("jay");
        JavaBeanOperator jbo = new JavaBeanOperator(jb);
        jbo.echoMessage();
    }
}